import pygame

class Object(pygame.sprite.Sprite):
    def __init__(self, name, **args):
        pygame.sprite.Sprite.__init__(self)
        #the technical name of the object
        self.name = name
        #the name of the object when used as the subject in a sentence
        self.subj_name = name
        #the name of the object when used as the object in a sentence
        self.objv_name = name

        #whether the subjective form of the name requires pluralised descriptors
        #e.g., for 'you', use 0 as in 'you miss'
        #for 'the rat', use 1 as in 'the rat misses'
        self.subj_plural = 0

        #x, y position of the object in the current level
        self.x, self.y = -1, -1
        #width and height of the object in tiles
        self.w, self.h = 1, 1
        
        #the offset to start the sprite drawing
        self.off = (0, 0)

        self.orient = 'n'



        self.tick = 0


        self.actions = []
        self.default_action = None

        self.action_queue = deque()


    def place(self, x, y):
        self.x = x
        self.y = y

    def move(self, x, y):
        self.x = self.x + x
        self.y = self.y + y

    def pos(self):
        return [self.x, self.y]

    def update_ai(self, gd):
        pass

class Cursor(Object):
    def __init__(self, name):
        Object.__init__(self, name)

        self.valid = 0